Know Thy Code (a supplement to "Design Your Own Web Site")
by Niko Coucouvanis
If you really want to get in and tweak your pages by hand, here’s a little HTML cheat sheet to guide your way. We’re using examples in some of the code that calls for it--substitute your own choices accordingly.
Text Formatting
• Set the font face, size (1-7), and color: <FONT FACE="Swiss, Helvetica, Sans-serif" SIZE="4" COLOR="#000000">fonted text</FONT>
• Make text bold: <B>bold text</B>
• Italicize text: <I>italic text</I>
Linking
• Create a hotlink to an image, page, or Web site: <A HREF=http://www.webpage.com TARGET="_new">hotlink</A>
(The Target attribute opens the link or image in a new window or a window you’ve named in a prior link tag.)
Images
• Insert an image with specified height, width, border, and text-relative alignment, plus alternate text to display to browsers with images disabled:
<IMG SRC="path to image" WIDTH="120" HEIGHT="158" BORDER="0" ALIGN="LEFT" ALT="description of image" HSPACE="3" VSPACE="3">
Page Layout
• Create a break before and after paragraph text or images: <P align=”center”>paragraph</P>
(Optional Align attribute can align text left, right, or center.)
• Create a line break: <BR>
• Align contained elements left, right, or center on the page: <DIV ALIGN="RIGHT">align right</DIV>
• Center contained text: <CENTER>align center</CENTER>
• Insert a horizontal rule (great as a page divider): <HR>
Advanced Page Layout—Tables
Here’s a simple table in HTML code: Cell-spacing and Cell-padding attributes cushion content from the cell’s edges, Align and Valign attributes dictate alignment within cells, except for the initial TABLE tag where Align governs the alignment of the table itself.